#if 0
#ifndef _FILE_TRACKER_H_
#define _FILE_TRACKER_H_

#include <map>
#include <vector>
#include <string>
#include <windows.h>

namespace res
{
class Tracked;
// looks for changes in files on disk
class FileTracker
{
public:
	/// Singleton accessor
	static FileTracker&	Instance();

	/// start tracking file
	void				StartTrackingFile(const std::string& _File, Tracked* _pUser);
	/// stop tracking file
	void				EndTrackingFile(const std::string& _File, Tracked* _pUser);
	/// remove Tracked asset from DB
	void				RemoveTracked(Tracked* _pUser);
	/// check for tracking
	void				Tick();
private:
	/// list of users subscribed to a file
	struct		FileUsers
	{
		/// users
		std::vector<Tracked*>		m_Users;

		/// Get the index of pointer NN
		int							GetIndex(Tracked* _pData);
	};
	typedef std::map<unsigned long, FileUsers*>		TrackMap;

	/// thread doing monitoring of the file system
	static DWORD WINAPI WorkerThread(void* Data );	
	/// Function for worker thread to add a file to the changed list
	void				AddChangedFile(const std::string& _File);

	/// get the FileUser list responsible for a given ID
	FileUsers*			GetFileData(unsigned long _ID);
	/// get ID from filename
	unsigned int		GetFileID(const std::string& _File);
	/// called when a file is updated
	void				FileUpdated(const std::string& _File);

	/// is it tracking currently ?
	bool				m_IsActive;
	TrackMap			m_TrackedFiles;

	// should we support more than one directory ?
	std::vector<std::string>	m_ChangedFiles;
	HANDLE						m_WorkerThread;
	CRITICAL_SECTION			m_CriticalSection;


	/// Constructor
	FileTracker();
	/// Destructor
	~FileTracker();

	// prevent copying
    FileTracker( const FileTracker & );     
    FileTracker & operator=( const FileTracker & );
};

} // namespace res
#endif // _FILE_TRACKER_H_
#endif